<template>
    <!-- <div>
        <van-nav-bar title="home" left-text="" left-arrow>
            <template #left>
                <van-icon name="wap-nav" size="20" />
            </template>
            <template #right>
                <van-icon name="user-circle-o" size="20" />
            </template>
        </van-nav-bar>
    </div> -->

    <div>
         <h2>Hi Mehedi <br>
            Find your food</h2>
    </div>

    <div>
        <van-search v-model="value" placeholder="请输入搜索关键词" right-icon='exchange'/>
    </div>

    <div>
        <ul class="list">
            <li class="active">Food</li>
            <li>Fruits</li>
            <li>Vegetables</li>
            <li>Grocery</li>
        </ul>
    </div>

    <div>
        <van-grid :border="false" :column-num="2">
            <van-grid-item>
                <div class="combox">
                    <img src="https://img.js.design/assets/img/6295d24a74d3b8123736bf1c.jpg"><van-icon name="like-o" class="xin" size='20'/>
                    <h3>Avocada Salad</h3>
                    <div class="fen"><span>20min</span><span>⭐4.5</span></div>
                    <p>$12.00</p>
                    <div class="jia">+</div>
                </div>
            </van-grid-item>
            <van-grid-item v-for="item in 4">
                <div class="combox">
                    <img src="https://img.js.design/assets/img/6295d24a74d3b8123736bf1c.jpg"><van-icon name="like" class="xin" size='20' color='red'/>
                    <h3>Avocada Salad</h3>
                    <div class="fen"><span>20min</span><span>⭐4.5</span></div>
                    <p>$12.00</p>
                    <div class="jia">+</div>
                </div>
            </van-grid-item>
        </van-grid>
    </div>

    <div style="height:50px"></div>
</template>

<script>
    export default {
        data(){
            return {
                value: '',
            }
        },
        methods: {
        },
    }
</script>

<style scoped>
    h2{
        padding: 10px;
        font-size: 34px;
        font-weight: 600;
    }
    .fen{
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 15px;
    }
    .combox>p{
        position: absolute;
        bottom: 12px;
        left: 14px;
        font-size: 20px;
        font-weight: 700;
    }
    .jia{
        width: 40px;
        height: 40px;
        background-color: #449E2E;
        color: #fff;
        border-radius: 24px 0 24px 0;
        position: absolute;
        bottom: 0;
        right: 0;
        text-align: center;
        line-height: 40px;
        font-size: 40px;
    }
    .xin{
        position: absolute;
        top: 10px;
        right: 10px;
    }
    .list{
        display: flex;
        justify-content: space-around;
    }
    .active{
        color: #449E2E;
    }
    .combox{
        width: 168px;
        height: 260px;
        overflow: hidden;
        position: relative;
        border-radius: 24px;
        background: rgba(242, 242, 242, .7);
        text-align: center;
        box-sizing: border-box;
        padding: 10px;
    }
    .combox>img{
        width: 116px;
        height: 116px;
        border-radius: 50%;
        margin: 5px 0;
    }
</style>